package com.gegewa.topic.jdata.sameagain;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class FirstPlusSecond {

    public List<String[]> getResult(Map<String, String> firstMap, List<String> secondUserIdList, String skuId) {
        List<String[]> resultList = new ArrayList<>();
        for (int i = 0, size = secondUserIdList.size(); i < size; i++) {
            if (firstMap.containsKey(secondUserIdList.get(i))) {
                resultList.add(new String[] {secondUserIdList.get(i), firstMap.get(secondUserIdList.get(i))});
            } else {
                resultList.add(new String[] {secondUserIdList.get(i), skuId});
            }
        }
        return resultList;
    }

}
